/**
 * @author: Stephen Halm
 * @date: Nov, 09, 2010
 * @version 0.0.1
 * @class ControlMessage
 */
package uicgas.globaldata;

import java.io.Serializable;

/**
 * @author: Stephen Halm
 * @date: Nov, 09, 2010
 * @version 0.0.1
 * @class ControlMessage
 */
public class ControlMessage implements Serializable
{
	/**
	 * 
	 */
	private static final long serialVersionUID = -8786230669878265042L;

	//	//List of control message Strings
	//	public static final String CONNECTPUMP = "connectpump";
	//	public static final String CONNECTREGISTER = "connectregister";
	//	public static final String NOTIFYREGISTERASSISTANCENEEDED = "notifyregisterassistanceneeded";
	//	public static final String CHANGEPUMPSTATE = "changepumpstate";
	//	public static final String ANNOUNCEDECOMMPUMPS = "announcedecommpumps";
	//	public static final String ANNOUNCEALLCONNECTEDPUMPS = "announceallconnectedpumps";
	//	public static final String ANNOUNCEPUMPSTATE = "announcepumpstate";
	//	public static final String CHARGECREDITCARD = "chargecreditcard";
	//	public static final String DEQUEUEASSISTANCE = "dequeueassistance";
	//	public static final String VALIDATECARD = "validatecard";
	//	public static final String ACTIVATEPUMP = "activatepump";
	//	public static final String DEACTIVATEPUMP = "deactivatepump";
	//	public static final String DECOMMISSIONPUMP = "decommissionpump";
	//	public static final String RECOMMISSIONPUMP = "recommissionpump";
	//	public static final String ANNOUNCETRANSACTION = "announcetransaction";
	//	public static final String VALIDATERECOMMPASSWORD = "validatecommpassword";
	//	public static final String CHANGERECOMMPASSWORD = "changerecommpassword";
	//
	//	//Pump and Register specific control message Strings
	//	public static final String ANNOUNCESTATE = "announcestate";
	//	public static final String ANNOUNCESELF = "announceself";
	//	public static final String NOTIFYASSISTANCE = "notifyassistance";
	//	public static final String VALID = "valid";
	//	public static final String INVALID = "invalid";
	//
	//	//Error
	//	public static final String ERROR = "ERROR";
	//
	private Messages message;
	//	private String sMessage;
	private MessagePayload payload;

	//	public ControlMessage()
	//	{
	//		sMessage = "";
	//		payload = null;
	//	}

	public ControlMessage(Messages newMessage, MessagePayload newPayload)
	{
		message = newMessage;
		payload = newPayload;
	}

	//	public ControlMessage(String newMessage, MessagePayload newPayload)
	//	{
	//		sMessage = newMessage;
	//		payload = newPayload;
	//	}

	/**
	 * @author: Stephen Halm
	 * @Date: Nov, 09, 2010
	 * @method: getMessage
	 * @description: method used to get the private element message.
	 */
	public Messages getMessage()
	{
		return message;
	}

	//	public String getSMessage()
	//	{
	//		return sMessage;
	//	}

	/**
	 * @author: Stephen Halm
	 * @Date: Nov, 09, 2010
	 * @method: getPayload
	 * @description: method used to get the private element payload.
	 */
	public MessagePayload getPayload()
	{
		return payload;
	}

}
